imageware
Class Convolver

java.lang.Object
  extended by imageware.Convolver

public class Convolver
extends java.lang.Object

Class Convolver. Routines to convolve a 1D signal applying mirror boundary conditions.


Constructor Summary
Convolver()
           
 
Method Summary
static double[] convolveFIR(double[] input, double[] kernel)
          Convolution with a Finite Impulse Response (FIR) filter.
static double[] convolveIIR(double[] input, double[] poles)
          Convolve with with a Infinite Impluse Response filter (IIR)
static double[] convolveIIR2(double[] input, double b1, double b2)
          Convolve a 1D signal with a Infinite Impluse Response 2nd order (IIR2) Note: Only with the mirror (on bounds) boundary conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convolver

public Convolver()
Method Detail

convolveFIR

public static double[] convolveFIR(double[] input,
                                   double[] kernel)
Convolution with a Finite Impulse Response (FIR) filter. Note: Only with the periodic boundary conditions.

Parameters:
input - 1D input signal
kernel - kernel of the filter

convolveIIR

public static double[] convolveIIR(double[] input,
                                   double[] poles)
Convolve with with a Infinite Impluse Response filter (IIR)

Parameters:
input - 1D input signal
poles - 1D array containing the poles of the filter

convolveIIR2

public static double[] convolveIIR2(double[] input,
                                    double b1,
                                    double b2)
Convolve a 1D signal with a Infinite Impluse Response 2nd order (IIR2) Note: Only with the mirror (on bounds) boundary conditions. Purpose: Recursive implementation of a symmetric 2nd order filter with mirror symmetry boundary conditions : 1 1 H[z] = --------------- * --------------- (1-b1*z-b2*z^2) (1-b1/z-b2/z^2) implemented in the following form: a1+a2*z a1+a2/z H[z] = --------------- + --------------- - a1 (1-b1*z+b2*z^2) (1-b1/z+b2/z^2) where : a1 = -(b2 + 1.0) * (1 - b1 + b2) / ((b2 - 1.0) * (1 + b1 + b2)); a2 = - a1 * b2 * b1 / (b2 + 1.0);

Parameters:
input - 1D input signal
b1 - first pole of the filter
b2 - second pole of the filter